import React, {Component} from 'react';
import {hot} from 'react-hot-loader/root';
import {connect} from 'dva';
import ReactEcharts from 'echarts-for-react';

@connect(({global, trends}) => ({
    global,
    chartOptions: trends.options
}))
class RouteForms extends Component {
    constructor(props) {
        super(props);
        this.state = {};
    }
    render() {
        return (
            <section>
                <ReactEcharts
                    ref="chartRefs"
                    option={this.props.chartOptions}
                    style={{
                        height: '500px'
                    }}
                    notMerge={false}
                    lazyUpdate={true}
                    theme={'macarons'}
                    loading={false}
                />
            </section>
        );
    }
}

export default hot(RouteForms);
